<phone:PhoneApplicationPage
    x:Class="LyonMag.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
   xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:adds="clr-namespace:GoogleAds;assembly=GoogleAds"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="#F2F2F2">
        <Grid.RowDefinitions>
            <RowDefinition Height="80"/>
            <RowDefinition Height="800"/>
        </Grid.RowDefinitions>
        
        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel  x:Name="TitlePanel" Grid.Row="0" Margin="0,0,0,0" Orientation="Horizontal">
            <Image x:Name="imgLogo" Source="Assets/Licons/navBar.png" Margin="-60,0,0,0" Width="600"/>
            <Image x:Name="imgRefresh" Source="Assets/refresh.png" Margin="-300,0,0,0" Width="60" Tap="imgRefresh_Tap"></Image>
            <Image x:Name="add" Source="Assets/add.png" Margin="-180,0,0,0" Tap="add_Tap" Width="62" Visibility="Collapsed"></Image>
            <Button   Content="Forum" Background="Gray" Margin="-900,-10,0,0" Width="120" BorderBrush="Transparent" x:Name="btnForum" Click="btnForum_Click"/>
        </StackPanel>
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0" Background="White">
            <ProgressBar x:Name="btnProgress" Grid.Row="1" IsIndeterminate="True" Foreground="Red" Margin="0,00,0,0" Height="20" Background="Red"></ProgressBar>
            <ScrollViewer HorizontalAlignment="Left" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Visible">
                <StackPanel Visibility="Collapsed" Margin="0,-700,0,0" Background="Gray" Orientation="Horizontal" Height="100" x:Name="stkFilesradio">
                    <RadioButton Foreground="White" IsChecked="true"  x:Name="radioTous" Content="Tous" Width="150" HorizontalAlignment="Left" GroupName="Group1" 
                     Checked="radioTous_Checked" FontSize="15"/>
                    <RadioButton x:Name="RADIOPOLITE" Content="Politique" GroupName="Group1" 
                     Checked="RADIOPOLITE_Checked" FontSize="15"  HorizontalAlignment="Left" Width="150"/>
                    <RadioButton Width="150" HorizontalAlignment="Left" x:Name="radiojudi" FontSize="15" Content="Judiciaire" GroupName="Group1" 
                    Checked="radiojudi_Checked"/>
                    <RadioButton HorizontalAlignment="Left" x:Name="radiosocial" GroupName="Group1"  Content="Social" FontSize="15" Checked="radiosocial_Checked" Width="150"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" Content="Faits Divers" Checked="Fait_Checked" x:Name="Fait" FontSize="15" Width="AUTO"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" Content="Transports" x:Name="trans" Checked="trans_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="OLe" Content="OL endirect" Checked="OLe_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" Content="Société" GroupName="Group1" x:Name="societe"  Checked="societe_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Edu" Content="Education" Checked="Edu_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Eco" Content="Economie" Checked="Eco_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Social" Content="Social" Checked="Social_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Sports" Content="Sports" Checked="Sports_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="ASVEL" Content="ASVEL" Checked="ASVEL_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Cul" Content="Culture" Checked="Cul_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton  HorizontalAlignment="Left" GroupName="Group1" x:Name="End" Content="Lou en direct" Checked="End_Checked" Width="AUTO" FontSize="15"></RadioButton>
                    <RadioButton HorizontalAlignment="Left" GroupName="Group1" x:Name="Peo" Content="People" Checked="Peo_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="San" Content="Sante" Checked="San_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="Et" Content="Et aussi à Lyon" Checked="Et_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="High" Content="High-Tech" Checked="High_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="meto" Content="Meteo" Checked="meto_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="envi" Content="Environment" Checked="envi_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="contri" Content="Contributions" Checked="contri_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="Edi" Content="Edito" Checked="Edi_Checked" FontSize="15"></RadioButton>
                    <RadioButton GroupName="Group1" x:Name="ca" Content="Ça Jazz à Lyon" Checked="ca_Checked" FontSize="15"></RadioButton>
                </StackPanel>
            </ScrollViewer>
            <StackPanel Visibility="Collapsed" Margin="0,-700,0,0" Background="Gray" Orientation="Horizontal" Height="100" Width="600" x:Name="stkCinemaRadio">
                <RadioButton Foreground="White"  x:Name="LesRadio" Content="Ciné : les sorties" GroupName="Cinema" 
                IsChecked="true"    Checked="LesRadio_Checked"  FontSize="20" Margin="35,0,0,0"/>
                <RadioButton x:Name="alaRadio" Content="Ciné : à l'affiche" GroupName="Cinema" 
                   Checked="alaRadio_Checked" FontSize="20" />
            </StackPanel>
            <!--Forum-->
            <ListBox x:Name="lstForum" Visibility="Visible" SelectionChanged="lstForum_SelectionChanged" Margin="10,0,0,0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Background="#DDDDDD"  Width="450">
                            <StackPanel Height="10" Background="White"></StackPanel>
                            <StackPanel Background="#DDDDDD" Width="AUTO" HorizontalAlignment="Left">
                                <TextBlock Text="{Binding Color_name}"  FontSize="25" Width="AUTO"></TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Date}"   FontSize="22" Foreground="Gray"></TextBlock>
                                <TextBlock Text="{Binding Commentscount}" FontSize="22"  HorizontalAlignment="Left" Foreground="Red" Width="258"></TextBlock>
                            </StackPanel>
                            <StackPanel>
                                <TextBlock  Text="{Binding Title}" FontWeight="SemiBold" Foreground="Black" FontSize="25"  Width="400" TextWrapping="Wrap"></TextBlock>
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <!--Files-->
            <ListBox x:Name="lstFiles"  Visibility="Collapsed" SelectionChanged="lstFiles_SelectionChanged" Margin="10,110,0,0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical" Width="450" HorizontalAlignment="Center">
                            <StackPanel Orientation="Horizontal"  Background="#DDDDDD" Width="500" Height="90" VerticalAlignment="Center" Margin="0,0,0,0">
                                <StackPanel Margin="0,0,0,0" >
                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                        <TextBlock Text="{Binding Date}"  Foreground="Black"></TextBlock>
                                        <TextBlock Text="{Binding Category}" Foreground="Red" Margin="20,0,0,0"></TextBlock>
                                    </StackPanel>
                                    <TextBlock  Text="{Binding Title}" FontWeight="SemiBold" Foreground="Black" FontSize="25"  Width="350" Height="100"  TextTrimming="WordEllipsis"></TextBlock>
                                </StackPanel>

                            </StackPanel>
                            <StackPanel Height="10" Background="White"></StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

            <!--Act-->
            <ListBox x:Name="lstAct" Visibility="Visible" SelectionChanged="lstAct_SelectionChanged" Margin="10,10,0,0" RenderTransformOrigin="0.776,0.33"  >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical" Width="450" HorizontalAlignment="Center" >
                            <StackPanel Orientation="Horizontal" Height="160" Background="#DDDDDD" Width="450">
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="{Binding  AppImage}" Height="150" Width="100" Stretch="Uniform" VerticalAlignment="Center" Margin="0,0,0,0"></Image>
                                    <StackPanel Margin="10,0,0,0">
                                        <TextBlock  Text="{Binding Title}" Foreground="Black" FontSize="23" FontWeight="Bold" Width="320" TextWrapping="Wrap" Height="60" ></TextBlock>
                                        <TextBlock  Text="{Binding Header}" Foreground="Black" FontSize="20"  Width="320" Margin="0,10,0,0" TextWrapping="Wrap"  Height="80"></TextBlock>
                                    </StackPanel>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Height="10" Background="White"></StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <!--Cinema-->
            <ListBox x:Name="lstCinema" Visibility="Collapsed" SelectionChanged="lstCinema_SelectionChanged" Margin="10,100,0,0">
                <ListBox.ItemTemplate>
                    <DataTemplate>

                        <StackPanel Orientation="Vertical" Height="200" Background="#DDDDDD" Width="450">
                            <StackPanel Height="10" Background="White"></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Image Source="{Binding  AppImage}" Height="200" Width="80" VerticalAlignment="Center" Margin="10,0,0,0"></Image>
                                <StackPanel Margin="20,0,0,0" VerticalAlignment="Center" >
                                    <TextBlock  Text="{Binding Title}" Foreground="Black" FontSize="25" FontWeight="Bold" Width="350" TextWrapping="Wrap" Margin="-120,0,0,0"></TextBlock>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock  Text="Réalisé par : " Foreground="Black"  FontSize="20"    TextWrapping="Wrap"  FontWeight="Bold"></TextBlock>
                                        <TextBlock  Text="{Binding Realisateur}" Foreground="Gray" FontSize="20"  Width="350"  TextWrapping="Wrap" TextTrimming="WordEllipsis" FontWeight="Bold"></TextBlock>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Genre : " Foreground="Black" FontWeight="Black"></TextBlock>
                                        <TextBlock  Text="{Binding Genres}" Foreground="Red" FontSize="20"  Width="350"  TextWrapping="Wrap" TextTrimming="WordEllipsis"></TextBlock>
                                    </StackPanel>

                                    <StackPanel Orientation="Horizontal">

                                        <TextBlock Text="Sortie le : " Foreground="Black" FontWeight="Bold"></TextBlock>
                                        <TextBlock Text="{Binding Date}" Foreground="Gray"></TextBlock>
                                    </StackPanel>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Height="10" Background="White"></StackPanel>
                        </StackPanel>


                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        <StackPanel Background="Black" Grid.Row="1" Margin="0,510,0,0" Orientation="Vertical" x:Name="stkad" >
            <StackPanel Background="Black" x:Name="btnCloseadd" Tap="btnCloseadd_Tap"  >
                <TextBlock Foreground="White" Text="publicité"  HorizontalAlignment="Center" ></TextBlock>
            </StackPanel>
           
            <adds:AdView  x:Name="adsss" Visibility="Visible" AdUnitID="ca-app-pub-5292432475881872/2410314931"
                     
        	Margin="0,0,0,0"            
        	Format="Banner"
        	ReceivedAd="OnAdReceived"
        	FailedToReceiveAd="OnFailedToReceiveAd"
        	 />

            <StackPanel Background="Black"></StackPanel>
            <StackPanel Orientation="Horizontal" Background="Black" >
                <StackPanel   Orientation="Vertical" Width="100" x:Name="stklatest" Background="Gray" Tap="stklatest_Tap"  >

                    <Image Source="Assets/Licons/icon_news.png" Height="50" HorizontalAlignment="Center"></Image>
                    <TextBlock Text="Actualité " HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
                <StackPanel Width="100" x:Name="stkFileInfo"  Tap="stkFileInfo_Tap" >
                    <Image Source="Assets/Licons/icon_wires.png" Height="50" Width="40" HorizontalAlignment="Center"></Image>
                    <TextBlock Text="Fil Info" HorizontalAlignment="Center"/>
                </StackPanel>
                <StackPanel Width="100" x:Name="stkForums" Tap="stkForums_Tap">
                    <Image Source="Assets/Licons/icon_forum.png" Height="50" Width="40"  HorizontalAlignment="Center"></Image>
                    <TextBlock Text="Forum" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
                <StackPanel Width="100" x:Name="stkCinema" Tap="stkCinema_Tap">
                    <Image Source="Assets/licons/icon_cinema.png" Height="50" Width="40" HorizontalAlignment="Center"></Image>
                    <TextBlock Text="Cinema" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
                <StackPanel Width="100" x:Name="stkLesPlus" Tap="stkLesPlus_Tap">
                    <Image Source="Assets/Licons/icon_more.png" Height="50" Width="40" Margin="-12,0,0,0" HorizontalAlignment="Center"></Image>
                    <TextBlock Text="Les Plus" HorizontalAlignment="Center" Margin="-22,0,0,0"></TextBlock>
                </StackPanel>
            </StackPanel>
          
        </StackPanel>
    </Grid>



</phone:PhoneApplicationPage>